package jp.co.ziro.wikidozan.service;

import org.slim3.datastore.Datastore;

import jp.co.ziro.wikidozan.meta.ViewMeta;
import jp.co.ziro.wikidozan.model.View;

public class ViewService {
    
    private static ViewMeta meta = new ViewMeta();

    /**
     * 名称からViewを検索
     * @param viewName
     * @return
     */
    public View findView(String viewName) {
        return Datastore.query(meta).filter(meta.name.equal(viewName)).asSingle();
    }

}
